let arr:[number,string,boolean]=[1,'123',true]
let arr1:string[]=['zyh']
let arr2:number[]=[1,2,3]
let arr3:boolean[]=[true,false]
let arr4:{
    name:string,
    age:number
}[]=[
    {
        name:'123',
        age:22
    },
    {
        name:'123',
        age:22
    },
]
let str:string=''
let fun=(can1:number,can2:number):number=>{
    return can1+can2
}
let bol:boolean=true
let num:number=123
let obj:{
    a:string
}={
    a:'zyh'
}

//数组方法
//    push在后面添加数据
//    sort排序
//    shift删除返回第一个数据
//    unshift在数组开头增加
//    join数组改成字符串    

let Arr:number[]=[1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1]
let NewArr:number[]=[]

Arr.forEach((item:number,index:number)=>{
    if(!NewArr.includes(item)){
        NewArr.push(item)
    }
})

console.log(NewArr,'123');




let Brr:number[]=[1,2,3,4,5,6,7,8,9]

Brr.forEach((item:number,index:number)=>{
    if(!(item==Brr.pop())){
        Brr.push(item)
    }
})
console.log(Brr);
